package com.djx.provider.controller;

import com.djx.comm.controller.BaseController;
import com.djx.provider.feign.SayHelloFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * @author dingjunxiong
 */
@RestController
@RequestMapping("hystrix")
public class HystrixController extends BaseController {

    @Resource
    SayHelloFeign sayHelloFeign;

    @RequestMapping("/sayHello")
    public Object sayHello(String name) {
        return successMsg(sayHelloFeign.sayHello(name));
    }
}
